package com.itheima.stargraph.utils;

import com.itheima.stargraph.pojo.User;

/**
 * TODO
 *
 * @Author huang
 * @Date 2025/6/11 2025/6/11
 */
public class UserThreadLocalUtils {
    static ThreadLocal<User> userThreadLocal=new ThreadLocal<>();
    public static User getUser(){
        return userThreadLocal.get();
    }
    public static void setUser(User user){
        userThreadLocal.set(user);
    }
    public static void removeUser(){
        userThreadLocal.remove();
    }
}
